Skip to content

Harden runtime validation and add dashboard shutdown - #32

Open
MonaDevAI wants to merge 5 commits into
mainfrom
fix/runtime-repair-review
Open

MonaDevAI wants to merge 5 commits into
mainfrom
fix/runtime-repair-review

Conversation

@MonaDevAI

@MonaDevAI MonaDevAI commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The portable Node repair could execute an existing unowned runtime during plan-only readiness checks, accept npm after only a version probe, and print unsafe or unusable PowerShell fallback guidance. Users also lacked a packaged way to stop a foreground dashboard from another terminal without manually identifying a Node process.

Change

  • Check the FixLab ownership marker before executing any existing portable runtime.
  • Require npm.cmd and a real npm pack --dry-run --ignore-scripts --json probe for existing, extracted, and final runtimes.
  • Generate PowerShell-safe single-quoted fallback paths and require explicit exact-version guidance for unpinned repositories.
  • Add fixlab dashboard [repository] --stop using an instance-specific local token and graceful loopback shutdown endpoint.
  • Document the strengthened runtime and dashboard ownership contracts.

Validation

  • Focused tests pass
  • npm pack --dry-run contains the required files
  • Documentation is updated
  • No credentials, tokens, private endpoints, or test data are included
  • npm run validate passes (92 unit tests and 8 Playwright tests)
  • Existing FMDM portable runtime passes the real npm operation probe after verified ownership migration
  • An unowned runtime directory is rejected before readiness inspection
  • Dashboard stop E2E leaves an unrelated dashboard process running
  • Fresh GitHub clone installed into an isolated prefix, started and stopped the dashboard, then uninstalled with the command removed

Risk

Low. Runtime changes add pre-install safety checks only. Dashboard shutdown accepts only a loopback request carrying the instance-specific token written by that dashboard. It never kills processes by name or PID and does not change permanent PATH, NVM, or repository content.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 712fbe09-8920-4820-8cba-cd665d429179
Copilot AI lite review requested due to automatic review settings September 25, 2026 17:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Two moderate issues remain in the advertised portable fallback command.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
What changed in this PR

Hardens portable Node runtime validation and improves repair fallback guidance.

Changes:

  • Enforces ownership and real npm dry-run validation.
  • Improves conditional fallback command generation.
  • Updates tests, documentation, and changelog.
File Description
test/​fixlab-cli.test.js Adds regression assertions.
scripts/​repair-node-runtime.ps1 Strengthens runtime validation and ownership checks.
scripts/​install-fixlab.ps1 Adds portable fallback generation.
docs/​troubleshooting.md Documents validation and ownership requirements.
docs/​installation.md Documents strengthened repair guarantees.
CHANGELOG.md Records the hardening changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/install-fixlab.ps1 Resolved
Comment thread scripts/install-fixlab.ps1 Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 712fbe09-8920-4820-8cba-cd665d429179
Copilot AI review requested due to automatic review settings September 25, 2026 17:30
@MonaDevAI MonaDevAI changed the title Harden portable runtime validation Harden runtime validation and add dashboard shutdown Sep 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved dashboard lifecycle/control-record failures and a critical reparse-point ownership risk block approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (2)

Comment thread scripts/repair-node-runtime.ps1 Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 712fbe09-8920-4820-8cba-cd665d429179
Copilot AI review requested due to automatic review settings September 25, 2026 17:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Fix the control-path symlink vulnerability before approval.

Review effort: Lite
Findings: None

Resolved since last review (1)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 712fbe09-8920-4820-8cba-cd665d429179
Copilot AI review requested due to automatic review settings September 25, 2026 17:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved reparse-point and dashboard ownership/reliability issues affect safe runtime repair and shutdown.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity

Open (2)

Comment thread scripts/repair-node-runtime.ps1 Resolved
Comment thread scripts/repair-node-runtime.ps1 Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 712fbe09-8920-4820-8cba-cd665d429179
Copilot AI review requested due to automatic review settings September 25, 2026 18:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Moderate control-record and shutdown-handling issues remain unresolved.

Review effort: Lite
Findings: None

Resolved since last review (2)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants